17. Quiz: Type and Type Conversion
Quiz: What Type Do These Objects Have?
Which Type? I
SOLUTION:
strWhich Type? II
SOLUTION:
floatWhich Type? III
SOLUTION:
intWhich Type? IV
SOLUTION:
strType Playground
Use this programming space with Test Run to experiment with types of objects. Don't forget to use print
to see the output of your code.
Start Quiz:
Quiz: Total Sales
In this quiz, you’ll need to change the types of the input and output data in order to get the result you want.
Calculate and print the total sales for the week from the data provided. Print out a string of the form "This week's total sales: xxx"
, where xxx will be the actual total of all the numbers. You’ll need to change the type of the input data in order to calculate that total.
Start Quiz:
mon_sales = "121"
tues_sales = "105"
wed_sales = "110"
thurs_sales = "98"
fri_sales = "95"
#TODO: Print a string with this format: This week's total sales: xxx
# You will probably need to write some lines of code before the print statement.